package com.volunteer.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.volunteer.entity.Registration;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * 报名Mapper接口
 */
@Mapper
public interface RegistrationMapper extends BaseMapper<Registration> {
    
    /**
     * 根据活动ID和用户ID查询报名记录
     */
    @Select("SELECT * FROM t_registration WHERE activity_id = #{activityId} AND user_id = #{userId} LIMIT 1")
    Registration selectByActivityAndUser(Long activityId, Long userId);
} 